package config

import (
	"encoding/json"
	"errors"
	"os"
	"path"
)

type Config struct {
	LogLevel  string           `json:"logLevel,omitempty"`
	Endpoints *ConfigEndpoints `json:"endpoints,omitempty"`
	Protocols *ConfigProtocols `json:"protocols,omitempty"`
	Keys      *ConfigKeys      `json:"keys,omitempty"`
}

type ConfigConsole struct {
	Enabled      bool   `json:"enabled,omitempty"`
	MuipEndpoint string `json:"muipEndpoint,omitempty"`
	MuipRegion   string `json:"muipRegion,omitempty"`
	MuipSign     string `json:"muipSign,omitempty"`
}

type ConfigEndpoints struct {
	MainEndpoint string              `json:"mainEndpoint,omitempty"`
	MainProtocol Protocol            `json:"mainProtocol,omitempty"`
	Console      *ConfigConsole      `json:"console,omitempty"`
	Mapping      map[Protocol]string `json:"mapping,omitempty"`
}

type ConfigProtocols struct {
	BaseProtocol Protocol            `json:"baseProtocol,omitempty"`
	Mapping      map[Protocol]string `json:"mapping,omitempty"`
}

type ConfigKeys struct {
	SharedKey  string            `json:"sharedKey,omitempty"`
	ServerKey  string            `json:"serverKey,omitempty"`
	ClientKeys map[uint32]string `json:"clientKeys,omitempty"`
}

func LoadConfig(path string) (*Config, error) {
	f, err := os.Open(path)
	if err != nil {
		return nil, err
	}
	defer f.Close()
	c := new(Config)
	d := json.NewDecoder(f)
	if err := d.Decode(c); err != nil {
		return nil, err
	}
	if c.Endpoints == nil {
		return nil, errors.New("no endpoint configured")
	}
	if c.Endpoints.Console == nil {
		c.Endpoints.Console = &ConfigConsole{}
	}
	if c.Protocols == nil {
		return nil, errors.New("no protocol configured")
	}
	if c.Keys == nil {
		return nil, errors.New("no key configured")
	}
	return c, nil
}

var DefaultConfig = &Config{
	LogLevel: "info",
	Endpoints: &ConfigEndpoints{
		MainEndpoint: "{{ UPSTREAM_SERVER_ADDRESS }}",
		MainProtocol: "{{ UPSTREAM_SERVER_VERSION }}",
		Console: &ConfigConsole{
			Enabled:      false,
			MuipEndpoint: "http://{{ MUIP_SERVER_ADDRESS }}/api",
			MuipRegion:   "dev_docker",
			MuipSign:     "9H2UrJ5J4yZJf95FqMkqi628snEmzvyV9oAp",
		},
		Mapping: map[Protocol]string{
			"{{ CLIENT_VERSION }}": "{{ SERVICE_LISTEN_ADDRESS }}",
		},
	},
	Protocols: &ConfigProtocols{
		BaseProtocol: ProtocolMajor3Minor2,
		Mapping: map[Protocol]string{
			ProtocolMajor3Minor2: path.Join("data/mapping/", string(ProtocolMajor3Minor2)),
		},
	},
	Keys: defaultConfigKeys,
}

var defaultConfigKeys = &ConfigKeys{
	SharedKey: "RWMyYhAAAACRgo74BzK07IdzLYLB+X6zAAgAAMOOtJP/5vvtTMSBF1AnJP997kZG14dqgtvfwIr8C4SsWvlx1UgL9HSheXa7AaACj8uDhSiPQyYQsrD7d/kSpm11b3YGpLbnGs+BlO/69cLqxBx8n/nnRLKKQ72wnmuJ2yVXvfqmB18ATy3qcxTcpjFlafXkpIsksAe2lzjC7lqO7rU2JNbdwVfrHOwu/H/2jyHxnQ/7N13E0M8xAT2LuBQRuA+j2fKExhr4NJlreav5NqphHBfAnc1Kyd/Jf04kLjUq1ht7PwC3Q8F6KKZbAhJfdrKa8WbMIKXyiLKD1LlUhlACDzh2Nt/mM8f49AGjCFG3mQepsBqn33DbVtakm3niVq/9hxvY23QZa/8Jz6QxXRp+KAM7LmnGgmBjDvL5FNtC6cJ+yN33Htx/c35g6pq6ChOXerYgd/nttdvo4H7d29uLXbnWBiGxVRu2t/g0GB7Ug0+QTikIGyrOD8OC5LPL2Ka6yDh8H8RwC4zumJapDCXG2D2GFAhN2orVYDBaC87WZFWBAUsegEDhBxvz5Kbg0p5oZA8bzc1/D75sIRBlkTmOZE2g5vNW5i6zG3/QGAcuYNmSj+Vb8Opy8H1a0u4HrDT099CWTx862QolBwe/XqFiuoUkpUF9W+8+v6pCBVdOl/qYKdpagOJmriWFJt7MesJoHiWsQz/yOkaVNRIkRW9088ZExqN1mn6djw4NKvLI4+wPsV0RI391oLHcD15wgwcji01fbuBnfuysEWcCv/TgoSjV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